﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace MyPSDALayer
{
    [MetadataType(typeof(MessageMetadata))]
    public partial class Message
    {
        private class MessageMetadata
        {
            [Required(ErrorMessage = "不能为空")]
            [Display(Name = "留言标题")]
            public string MsgTitle { get; set; }
            [Required(ErrorMessage = "不能为空")]
            [Display(Name = "电话")]
            public string Phone { get; set; }
            [Required(ErrorMessage = "不能为空")]
            [Display(Name = "QQ")]
            public string QQ { get; set; }
            [Required(ErrorMessage = "不能为空")]
            [Display(Name = "邮箱")]
            [DataType(DataType.EmailAddress)]
            public string Mail { get; set; }
            [Required(ErrorMessage = "不能为空")]
            [Display(Name = "留言内容")]
            public string Content { get; set; }
            [Required(ErrorMessage = "不能为空")]
            [Display(Name = "姓名")]
            public string CreateBy { get; set; }
            [Display(Name = "留言时间")]
            public System.DateTime CreateDate { get; set; }
        }
    }
}
